package org.example.myleet.p649;

public class Main {
    public static void main(String[] args) {
        String senate, answer;
        //case 1 Radiant
//        String senate = "RD";
        //case 2 Dire
//        String senate = "RDD";
        //case 3 Dire
//        String senate = "RDDDDR";
        //case 4 Dire
//        String senate = "D";
        //case 5 Dire
//        String senate = "DDRRR";
        //case 6 Radiant
//        String senate = "RRDDD";
        //case 7 Dire
//        String senate = "DRRD";
        Solution solution = new Solution();
        //case 1
        senate = "RD";
        answer = solution.predictPartyVictory(senate);
        if (!"Radiant".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 2
        senate = "RDD";
        answer = solution.predictPartyVictory(senate);
        if (!"Dire".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 3
        senate = "RDDDDR";
        answer = solution.predictPartyVictory(senate);
        if (!"Dire".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 4
        senate = "D";
        answer = solution.predictPartyVictory(senate);
        if (!"Dire".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 5
        senate = "DDRRR";
        answer = solution.predictPartyVictory(senate);
        if (!"Dire".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 6
        senate = "RRDDD";
        answer = solution.predictPartyVictory(senate);
        if (!"Radiant".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
        //case 7
        senate = "DRRD";
        answer = solution.predictPartyVictory(senate);
        if (!"Dire".equalsIgnoreCase(answer)) {
            throw new RuntimeException("Wrong!");
        }
    }
}
